package com.senlingspace.payment.douyin.bean.request;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.senlingspace.payment.douyin.DouyinFunctionEnum;
import com.senlingspace.payment.douyin.bean.response.DouyinQueryTicketStatusResponse;
import com.senlingspace.payment.utils.DouyinSignUtil;
import lombok.Data;

/**
 * 券状态单个查询
 *
 * @author lebronjames
 * @date 2024/07/23
 */
@Data
public class DouyinQueryTicketStatusRequest implements DouyinRequest<DouyinQueryTicketStatusResponse> {

    /**
     * 验券准备接口返回的加密券码
     * （传参前需要先进行URL编码）
     */
    @JsonProperty("encrypted_code")
    private String encryptedCode;


    @Override
    public DouyinFunctionEnum getFunction() {
        return DouyinFunctionEnum.query_ticket_status;
    }

    @Override
    public String getBody() {
        return "encrypted_code=" + DouyinSignUtil.encode(this.encryptedCode);
    }

    @Override
    public Class<DouyinQueryTicketStatusResponse> getResponseType() {
        return DouyinQueryTicketStatusResponse.class;
    }

}
